<!--
  This file is a part of the open-eBackup project.
  This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0.
  If a copy of the MPL was not distributed with this file, You can obtain one at
  http://mozilla.org/MPL/2.0/.
  
  Copyright (c) [2024] Huawei Technologies Co.,Ltd.
  
  THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
  EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
  MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
  -->

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html lang="en-us" xml:lang="en-us">
 <head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="DC.Type" content="topic">
  <meta name="DC.Title" content="Garbled Characters Are Added to the Name of a Newly Created Object That Is Named the Same as a Deleted Object During Restoration of the Active Directory System State in the Scenario with Primary and Secondary Domain Controllers Deployed">
  <meta name="product" content="">
  <meta name="DC.Relation" scheme="URI" content="en-us_topic_0000002164769606.html">
  <meta name="prodname" content="">
  <meta name="version" content="">
  <meta name="brand" content="">
  <meta name="DC.Publisher" content="20250306">
  <meta name="prodname" content="csbs">
  <meta name="documenttype" content="usermanual">
  <meta name="DC.Format" content="XHTML">
  <meta name="DC.Identifier" content="EN-US_TOPIC_0000002230518277">
  <meta name="DC.Language" content="en-us">
  <link rel="stylesheet" type="text/css" href="public_sys-resources/commonltr.css">
  <title>Garbled Characters Are Added to the Name of a Newly Created Object That Is Named the Same as a Deleted Object During Restoration of the Active Directory System State in the Scenario with Primary and Secondary Domain Controllers Deployed</title>
 </head>
 <body style="clear:both; padding-left:10px; padding-top:5px; padding-right:5px; padding-bottom:5px">
  <a name="EN-US_TOPIC_0000002230518277"></a><a name="EN-US_TOPIC_0000002230518277"></a>
  <h1 class="topictitle1">Garbled Characters Are Added to the Name of a Newly Created Object That Is Named the Same as a Deleted Object During Restoration of the Active Directory System State in the Scenario with Primary and Secondary Domain Controllers Deployed</h1>
  <div>
   <div class="section">
    <h4 class="sectiontitle">Symptom</h4>
    <p>After a user deletes object <strong>A</strong> and then creates object <strong>A'</strong> with the same name as object <strong>A</strong>, a replication conflict occurs during system-level restoration. As a result, the new object <strong>A'</strong> is automatically renamed in the format of <strong>A'CNF:</strong><em>GUID</em>.</p>
   </div>
   <div class="section">
    <h4 class="sectiontitle">Possible Causes</h4>
    <p><strong>DistinguishedName</strong> of the object already exists.</p>
   </div>
   <div class="section">
    <h4 class="sectiontitle">Method 1: Renaming Object <strong>A'CNF:</strong><em>GUID</em></h4>
    <p>To retain object <strong>A'CNF:</strong><em>GUID</em>, rename the object by referring to the <a href="https://learn.microsoft.com/en-us/troubleshoot/windows-server/active-directory/rename-item-replication-collision" target="_blank" rel="noopener noreferrer">officially released guide</a>.</p>
   </div>
   <div class="section">
    <h4 class="sectiontitle">Method 2: Deleting Object <strong>A'CNF:</strong><em>GUID</em></h4>
    <p>Delete object <strong>A'CNF:</strong><em>GUID</em> after the primary domain controller is restored and enters the normal mode but before the replication relationship between the primary and secondary domain controllers is established.</p>
    <div class="p">
     You can delete the object on the primary domain controller by running the following commands or on any secondary domain controller by referring to <a href="en-us_topic_0000002164609842.html">During Active Directory Object-Level Restoration, an Error Message Is Displayed, Indicating that the DistinguishedName of the Object Already Exists</a>.
     <pre class="screen">Import-Module ActiveDirectory
# Obtaining the name of the primary domain controller
$CurrentDC = $env:COMPUTERNAME
# Obtaining the names of all secondary domain controllers
$DomainControllers = Get-ADDomainController -Filter * | Where-Object { $_.Name -ne $CurrentDC }
# Obtaining and deleting all objects with replication conflicts
$CNFPattern = "CNF:[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}"
foreach ($DC in $DomainControllers) {
    $TargetDC = $DC.HostName
    Write-Host "Processing Domain Controller: $TargetDC"
  
    Get-ADObject -Filter { Name -like "*CNF:*" } -Server $TargetDC |
    Where-Object { $_.Name -match $CNFPattern } | ForEach-Object {
        Write-Host "Found object: $($_.DistinguishedName) on $TargetDC"
        
        Remove-ADObject -Identity $_.DistinguishedName -Confirm:$false -Recursive -Server $TargetDC
        Write-Host "Deleted object: $($_.DistinguishedName) from $TargetDC"
    }
}
Write-Host "Replication conflicting objects on all other domain controllers have been cleared."</pre>
    </div>
   </div>
  </div>
  <div>
   <div class="familylinks">
    <div class="parentlink">
     <strong>Parent topic:</strong> <a href="en-us_topic_0000002164769606.html">FAQs</a>
    </div>
   </div>
  </div>
 </body>
</html>